void draw_ellipse(Adafruit_GFX_STM32 *screen, int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint8_t option, boolean fill, uint16_t color) {
  uint16_t x, y;
  int32_t xchg, ychg;
  int32_t err;
  int32_t rxrx2;
  int32_t ryry2;
  int32_t stopx, stopy;

  rxrx2 = rx;
  rxrx2 *= rx;
  rxrx2 *= 2;

  ryry2 = ry;
  ryry2 *= ry;
  ryry2 *= 2;

  x = rx;
  y = 0;

  xchg = 1;
  xchg -= rx;
  xchg -= rx;
  xchg *= ry;
  xchg *= ry;

  ychg = rx;
  ychg *= rx;

  err = 0;

  stopx = ryry2;
  stopx *= rx;
  stopy = 0;

  while (stopx >= stopy) {
    draw_ellipse_section(screen, x, y, x0, y0, option, fill, color);
    y++;
    stopy += rxrx2;
    err += ychg;
    ychg += rxrx2;
    if (2 * err+xchg > 0) {
      x--;
      stopx -= ryry2;
      err += xchg;
      xchg += ryry2;
    }
  }

  x = 0;
  y = ry;

  xchg = ry;
  xchg *= ry;

  ychg = 1;
  ychg -= ry;
  ychg -= ry;
  ychg *= rx;
  ychg *= rx;

  err = 0;

  stopx = 0;
  stopy = rxrx2;
  stopy *= ry;

  while (stopx <= stopy) {
    draw_ellipse_section(screen, x, y, x0, y0, option, fill, color);
    x++;
    stopx += ryry2;
    err += xchg;
    xchg += ryry2;
    if (2 * err + ychg > 0) {
      y--;
      stopy -= rxrx2;
      err += ychg;
      ychg += rxrx2;
    }
  }
}